#version 450

layout(location = 0) in vec4 fragColor;
layout(location = 1) in vec2 fragUV;
layout(location = 0) out vec4 outColor;

layout(set = 2, binding = 0) uniform sampler2D mySampler;

void main() {
    vec4 color = texture(mySampler, fragUV);
    float gray = dot(color.rgb, fragColor.rgb);
    outColor = vec4(vec3(gray), color.a * fragColor.a);
}